package a.f.a;

import a.c.*;
import a.c.d;
import a.f.n.c;

import java.util.Comparator;

class g
  extends c
{
  x T;
  n U;
  n V;
  boolean W = false;
  double X = 90.0D;
  private boolean Y = false;
  
  public n D()
  {
    return this.V;
  }
  
  public void a(n paramn)
  {
    this.V = paramn;
  }
  
  public boolean F()
  {
    return this.Y;
  }
  
  protected void c(a.c.e parame)
  {
    int i = e.M;
    if (i == 0)
    {
      if (this.Y) {
        return;
      }
      if (i != 0) {}
    }
    else if (u())
    {
      Comparator local0 = new Comparator()
      {
        public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
        {
          int i = e.M;
          double d1 = g.this.V.getDouble(paramAnonymousObject1);
          double d2 = g.this.V.getDouble(paramAnonymousObject2);
          if (i == 0) {}
          if (i == 0) {}
          return d1 < d2 ? -1 : d1 > d2 ? 1 : 0;
        }
      };
      parame.b(local0);
      if (!e.L) {
        return;
      }
    }
    super.c(parame);
  }
  
  public void k(boolean paramBoolean)
  {
    this.Y = paramBoolean;
  }
  
  void b(double paramDouble)
  {
    this.X = paramDouble;
  }
  
  double G()
  {
    return this.X;
  }
  
  void a(n paramn, x paramx)
  {
    this.T = paramx;
    this.U = paramn;
    this.W = true;
  }
  
  protected void b(a.c.e parame)
  {
    int j = e.M;
    boolean bool = e.L;
    if (j == 0) {
      if (!n(parame))
      {
        super.b(parame);
        return;
      }
    }
    double d1 = z();
    double d2 = g(parame);
    double d3 = this.X;
    ab localab = new ab(parame.n());
    for (;;)
    {
      double d4 = (360.0D - d2) / 2.0D + d2;
      double d5 = d4 - d2;
      double d6 = h(parame);
      label101:
      Object localObject3;
      Object localObject4;
      label260:
      label270:
      label361:
      label373:
      double d7;
      label427:
      label580:
      do
      {
        Object localObject5;
        do
        {
          d6 = (360.0D - d2) / 2.0D;
          Object localObject1 = null;
          Object localObject2 = null;
          v localv = localab.f();
          do
          {
            if (localv == null) {
              break;
            }
            localObject3 = (d)localv.c();
            localObject4 = ((d)localObject3).f();
            localObject5 = a((a.c.e)localObject4);
            double d9 = this.U.getDouble(localObject3);
            double d11 = d9 - (d6 + ((c.d_)localObject5).c);
            if (bool) {
              break label580;
            }
            if (d11 >= 0.0D)
            {
              if (j != 0) {
                break label270;
              }
              if (d9 + ((c.d_)localObject5).b >= d4)
              {
                if (j == 0) {
                  if (d6 + ((c.d_)localObject5).a() <= d4)
                  {
                    d11 = d4 - d6 - ((c.d_)localObject5).a();
                    if (j != 0) {
                      break label270;
                    }
                    if (!bool) {
                      break label260;
                    }
                  }
                }
                d11 = 2.0D * (d4 - (d9 + ((c.d_)localObject5).b));
              }
            }
            ((c.d_)localObject5).d = 0.0D;
            if (j == 0)
            {
              if (d11 >= 0.0D)
              {
                ((c.d_)localObject5).d = d11;
                localObject1 = localv;
                localObject2 = localObject5;
                if (j != 0) {
                  continue;
                }
                if (!bool) {
                  break label548;
                }
              }
              if (j != 0) {}
            }
            else if (-d11 > ((c.d_)localObject5).b + ((c.d_)localObject5).c)
            {
              d11 = (((c.d_)localObject5).b + ((c.d_)localObject5).c) / 2.0D;
              if (j != 0) {
                break label373;
              }
              if (!bool) {
                break label361;
              }
            }
            d11 /= -2.0D;
            d6 -= d11;
            if (j == 0)
            {
              if (d6 > d4) {
                break label427;
              }
              if (j != 0) {}
            }
            else
            {
              if (d6 + ((c.d_)localObject5).a() <= d4) {
                break label427;
              }
              d6 += d11;
              d11 = d6 + ((c.d_)localObject5).a() - d4;
            }
            d6 -= d11;
            do
            {
              do
              {
                if (localObject1 == null) {
                  break;
                }
                if (bool) {
                  break label580;
                }
                if (d11 <= ((c.d_)localObject2).d) {
                  break;
                }
                d11 -= ((c.d_)localObject2).d;
                ((c.d_)localObject2).d = 0.0D;
                localObject1 = ((v)localObject1).b();
                if (j == 0)
                {
                  if (localObject1 == null)
                  {
                    localObject2 = null;
                    break;
                  }
                  localObject2 = a(((d)((v)localObject1).c()).f());
                }
              } while (!bool);
            } while (j != 0);
            if (localObject1 != null)
            {
              localObject2.d -= d11;
              if (j != 0) {
                continue;
              }
              if (!bool) {}
            }
            else
            {
              d6 += d11;
            }
            d6 += ((c.d_)localObject5).a();
            localv = localv.a();
          } while (!bool);
        } while (j != 0);
        if (d6 > d4) {
          break label736;
        }
        d7 = 0.0D;
        d6 = (360.0D - d2) / 2.0D;
        localObject4 = parame.n();
        do
        {
          if (!((m)localObject4).e()) {
            break;
          }
          localObject5 = ((m)localObject4).a();
          a.c.e locale = ((d)localObject5).f();
          double d10 = this.U.getDouble(localObject5);
          c.d_ locald_ = a(locale);
          double d12 = d6 + locald_.d + locald_.c;
          if (bool) {
            break label730;
          }
          if (d7 < Math.abs(d12 - d10)) {
            d7 = Math.abs(d12 - d10);
          }
          d6 += locald_.a();
          ((m)localObject4).f();
        } while (!bool);
      } while (j != 0);
      label548:
      label730:
      if (d7 <= this.X) {
        break;
      }
      label736:
      label737:
      int i = 0;
      label836:
      do
      {
        localObject3 = parame.q();
        do
        {
          if (!((w)localObject3).e()) {
            break;
          }
          localObject4 = ((w)localObject3).d();
          double d8 = a((a.c.e)localObject4).e;
          d8 *= (1.0D + d1);
          if (bool) {
            break label836;
          }
          if (Double.isInfinite(d8))
          {
            d8 = A();
            i = 1;
          }
          a((a.c.e)localObject4).e = d8;
          ((w)localObject3).f();
        } while (!bool);
        if (j != 0) {
          break label101;
        }
        if (i == 0) {
          break;
        }
        this.X += 10.0D;
        if (j != 0) {
          break label737;
        }
      } while (bool);
    }
  }
  
  protected double g(a.c.e parame)
  {
    int i = e.M;
    if (i == 0) {
      if (!n(parame)) {
        return super.g(parame);
      }
    }
    if (i == 0) {
      if (parame.d() == 0) {
        return w();
      }
    }
    return x();
  }
  
  boolean n(a.c.e parame)
  {
    int i = e.M;
    if (i == 0) {
      if (this.W)
      {
        if (i != 0) {
          break label41;
        }
        if (parame.e() != 0) {
          break label28;
        }
      }
    }
    return false;
    label28:
    label41:
    return this.U.get(parame.h()) != null;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.a.g

 * JD-Core Version:    0.7.0.1

 */